import request from '@/utils/request'

// 查询生产退料列表
export function listReturnMaterials(query) {
  return request({
    url: '/returnMaterials/returnMaterials/list',
    method: 'get',
    params: query
  })
}

// 查询生产退料详细
export function getReturnMaterials(id) {
  return request({
    url: '/returnMaterials/returnMaterials/' + id,
    method: 'get'
  })
}

// 新增生产退料
export function addReturnMaterials(data) {
  return request({
    url: '/returnMaterials/returnMaterials',
    method: 'post',
    data: data
  })
}

// 修改生产退料
export function updateReturnMaterials(data) {
  return request({
    url: '/returnMaterials/returnMaterials',
    method: 'put',
    data: data
  })
}

// 删除生产退料
export function delReturnMaterials(id) {
  return request({
    url: '/returnMaterials/returnMaterials/' + id,
    method: 'delete'
  })
}
